package com.ynny.usermanager.controller;

import com.ynny.usermanager.entity.R;
import com.ynny.usermanager.entity.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping ("/user")
public class UserController {


    //查询所有用户信息
    @RequestMapping("/list")
    public R list(){

        //模拟集合数据
        List list = new ArrayList<User>();

        list.add(new User(1,"张三","123456",20));
        list.add(new User(2,"张三2","123456",20));
        list.add(new User(3,"张三3","123456",20));
        list.add(new User(4,"张三4","123456",20));
        list.add(new User(5,"张三5","123456",20));
        list.add(new User(6,"张三6","123456",20));
        list.add(new User(7,"张三7","123456",20));

        return R.ok(list);


    }

}
